package org.iartisan.admin.template.service.support;

import org.iartisan.admin.template.dao.mapper.JnlsTraceSequenceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 流水号生成支持方法
 *
 * @author King
 * @date 2020-02-03
 */
@Service
public class JnlsTraceSeqSupport {

    @Autowired
    private JnlsTraceSequenceMapper jnlsTraceSequenceMapper;

    public int nextval(String seqName) {
        int i = jnlsTraceSequenceMapper.nextval(seqName);
        return i;
    }

    public int currval(String seqName) {
        int i = jnlsTraceSequenceMapper.currval(seqName);
        return i;
    }

    public int setval(String seqName, int value) {
        int i = jnlsTraceSequenceMapper.setval(seqName, value);
        return i;
    }
}
